<?php

/**
 * start actions.
 *
 * @package    edmuch
 * @subpackage start
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class startActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
      
      $response = $this->getResponse();
      $response->setTitle('E-dmuchawka - Wygraj z wadą wymowy');
      
      if ($this->getUser()->getGuardUser()) {
          $this->setLayout('layoutZalogowany');
          if ($this->getUser()->getGuardUser()->hasPermission(sfConfig::get('app_terapeuta_permission_name'))):
            $this->redirect('zestawienie', 'index');
          endif;
      }
    //$this->forward('default', 'module');
    $this->games = Doctrine_Core::getTable('Game')
      ->createQuery('a')
      ->limit(4)
      ->execute();
  }
}
